While, as will be better understood from the following description, the present invention was developed to improve the quality and compression ratios of compressed texture patterns while allowing somewhat random single pixel decompression, this invention may also find utility in other environments.
Texture pattern mapping is employed on high-end graphics workstations and rendering systems to increase the visual complexity of a scene without increasing its geometric complexity. Texture pattern mapping allows a rendering system to map an image onto simple scene geometry to make objects look much more complex or realistic than the underlying geometry. Recently, texture pattern mapping hardware has become available on lower-end workstations, personal computers, and home game systems.
One of the costs of texture pattern mapping is the memory space occupied by the texture patterns. For a particular scene, the memory space required by the texture patterns is dependent on the number of texture patterns and the size of each texture pattern. In some cases, the memory space occupied by the stored texture patterns may exceed in size the memory space occupied by the stored scene geometry.
In real-time texture mapping hardware systems, texture patterns arc generally placed in dedicated memory that can be accessed as quickly as pixels are generated. In some hardware systems, texture patterns are replicated in memory to facilitate fast parallel access. Because texture memory is a limited resource in these systems, it is consumed quickly. Although memory concerns are less severe for software rendering systems, since texture patterns are usually stored in main memory, there are advantages to conserving texture memory. Using less memory for texture patterns may yield caching benefits. One way to alleviate these memory limitations is to store compressed representations of texture patterns in memory. A modified renderer can then render directly from the compressed representation.
Vector quantization (VQ) supports fast decompression while achieving compression ratios of up to 35:1 with acceptable loss in the visual quality of the rendered scene. Processing time is increased only slightly, and incorporating VQ into hardware has very little impact on rendering performance. Unfortunately, VQ compressed texture patterns require large codebooks that take up expensive cache space.
The present invention is directed to overcoming the foregoing and other disadvantages associated with the compression and decompression of texture patterns. More specifically, the present invention is directed to methods and apparatus for providing a high speed, high image quality and high compression ratio texture pattern compression scheme.